﻿using System;
using System.Linq;
using System.IO;
using System.IO.IsolatedStorage;
using System.Collections.Generic;
using Microsoft.LightSwitch;
using Microsoft.LightSwitch.Framework.Client;
using Microsoft.LightSwitch.Presentation;
using Microsoft.LightSwitch.Presentation.Extensions;
namespace LightSwitchApplication
{
    public partial class EditableContacts
    {
        partial void ImportFromExcel_Execute()
        {
            ExcelImporter.Importer.ImportFromExcel(ContactsByName);
        }

        partial void EditableContacts_Saving(ref bool handled)
        {
            // Write your code here.

        }

        partial void gridAddAndEditNew_CanExecute(ref bool result)
        {
            // Write your code here.

        }

        partial void gridAddAndEditNew_Execute()
        {
            this.Application.ShowCreateNewContact(0,0,0);
        }

        partial void gridEditSelected_Execute()
        {
            if (ContactsByName.SelectedItem != null) this.Application.ShowContactDetail(ContactsByName.SelectedItem.Id);
        }
    }
}
